program het
use imsl
implicit none


integer,parameter :: hh=69,nex=4,nobs=24,no=10
integer irank,iseed,a,b,c,d,e,f,g,h,istat,m,t,r,i,j,k,a1,a2,p,q,u,cc,dd,vv,rrr,tt,npc
real(8) master2(1123,13),t1,master1(41914,6),xbar,pid(204,1),pidcum(204,1),temp(1123,64),art1,art2,movieid(300,1),moviegenre(300,1)
real(8) t2,t3,t14(51,1)
open (35,file="C:\Documents and Settings\vn28\Desktop\movies data mar10\finalmoviesbyartistemovies.txt",status="old",iostat=istat)
read (35,*) ((master2(j,i),i=1,13),j=1,1123)
open (20,file="C:\Documents and Settings\vn28\Desktop\movies data mar10\finalmoviesbyartistedetailed.txt",status="old",iostat=istat)
read (20,*) ((master1(j,i),i=1,6),j=1,41914) !artisteid, yrofrel, movid, rev, prod budget, genre (0-7)

c=1
do d=1,6
print *,master1(41914,c)
c=c+1
enddo

a=1
do b=1,1123
c=1
do d=1,13
temp(a,c)=master2(a,c)
c=c+1
enddo
a=a+1
enddo

!temp(a,14): no. of common movies b/w lead male (status=1) and lead female (status=2)
a=1
do b=1,1123
if (temp(a,5).eq.1) then
art1=temp(a,6) !743
else
endif
if (temp(a,7).eq.1) then
art1=temp(a,8) !743
else
endif
if (temp(a,9).eq.1) then
art1=temp(a,10) !743
else
endif
if (temp(a,11).eq.1) then
art1=temp(a,12) !743
else
endif
if (temp(a,5).eq.2) then
art2=temp(a,6) !743
else
endif
if (temp(a,7).eq.2) then
art2=temp(a,8) !743
else
endif
if (temp(a,9).eq.2) then
art2=temp(a,10) !743
else
endif
if (temp(a,11).eq.2) then
art2=temp(a,12) !743
else
endif
c=1
do d=1,41914
if(master1(c,1).eq.art1) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
e=e+1
movieid(e,1)=master1(c,3)
moviegenre(e,1)=master1(c,6)!genre
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
e=0
c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,14)=temp(a,14)+1
if (moviegenre(f,1).eq.master1(c,6)) then
temp(a,50)=temp(a,50)+1
else
endif
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
a=a+1
enddo

!temp(a,15): no. of common movies b/w lead male (status=1) and director
a=1
do b=1,1123
art2=temp(a,13) !director id
if (temp(a,5).eq.1) then
art1=temp(a,6) !743
else
endif
if (temp(a,7).eq.1) then
art1=temp(a,8) !743
else
endif
if (temp(a,9).eq.1) then
art1=temp(a,10) !743
else
endif
if (temp(a,11).eq.1) then
art1=temp(a,12) !743
else
endif

c=1
do d=1,41914
if(master1(c,1).eq.art1) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
e=e+1
movieid(e,1)=master1(c,3)
moviegenre(e,1)=master1(c,6)!genre
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
e=0
c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,15)=temp(a,15)+1
if (moviegenre(f,1).eq.master1(c,6)) then
temp(a,51)=temp(a,51)+1
else
endif
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
a=a+1
enddo

!temp(a,16): no. of common movies b/w lead male (status=1) and producer
a=1
do b=1,1123
art2=temp(a,3) !producer id
if (temp(a,5).eq.1) then
art1=temp(a,6) !743
else
endif
if (temp(a,7).eq.1) then
art1=temp(a,8) !743
else
endif
if (temp(a,9).eq.1) then
art1=temp(a,10) !743
else
endif
if (temp(a,11).eq.1) then
art1=temp(a,12) !743
else
endif

c=1
do d=1,41914
if(master1(c,1).eq.art1) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
e=e+1
movieid(e,1)=master1(c,3)
moviegenre(e,1)=master1(c,6)!genre
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
e=0

c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,16)=temp(a,16)+1
if (moviegenre(f,1).eq.master1(c,6)) then
temp(a,52)=temp(a,52)+1
else
endif
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
art2=temp(a,4) !second producer id
c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,16)=temp(a,16)+1
if (moviegenre(f,1).eq.master1(c,6)) then
temp(a,52)=temp(a,52)+1
else
endif
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
a=a+1
enddo

!temp(a,17): no. of common movies b/w lead male (status=1) and supporting male (status=3)
a=1
do b=1,1123
if (temp(a,5).eq.1) then
art1=temp(a,6) !743
else
endif
if (temp(a,7).eq.1) then
art1=temp(a,8) !743
else
endif
if (temp(a,9).eq.1) then
art1=temp(a,10) !743
else
endif
if (temp(a,11).eq.1) then
art1=temp(a,12) !743
else
endif
if (temp(a,5).eq.3) then
art2=temp(a,6) !743
else
endif
if (temp(a,7).eq.3) then
art2=temp(a,8) !743
else
endif
if (temp(a,9).eq.3) then
art2=temp(a,10) !743
else
endif
if (temp(a,11).eq.3) then
art2=temp(a,12) !743
else
endif
c=1
do d=1,41914
if(master1(c,1).eq.art1) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
e=e+1
movieid(e,1)=master1(c,3)
moviegenre(e,1)=master1(c,6)!genre
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
e=0
c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,17)=temp(a,17)+1
if (moviegenre(f,1).eq.master1(c,6)) then
temp(a,53)=temp(a,53)+1
else
endif
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
a=a+1
enddo

!temp(a,18): no. of common movies b/w lead male (status=1) and supporting female (status=4)
a=1
do b=1,1123
if (temp(a,5).eq.1) then
art1=temp(a,6) !743
else
endif
if (temp(a,7).eq.1) then
art1=temp(a,8) !743
else
endif
if (temp(a,9).eq.1) then
art1=temp(a,10) !743
else
endif
if (temp(a,11).eq.1) then
art1=temp(a,12) !743
else
endif
if (temp(a,5).eq.4) then
art2=temp(a,6) !743
else
endif
if (temp(a,7).eq.4) then
art2=temp(a,8) !743
else
endif
if (temp(a,9).eq.4) then
art2=temp(a,10) !743
else
endif
if (temp(a,11).eq.4) then
art2=temp(a,12) !743
else
endif
c=1
do d=1,41914
if(master1(c,1).eq.art1) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
e=e+1
movieid(e,1)=master1(c,3)
moviegenre(e,1)=master1(c,6)!genre
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
e=0
c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,18)=temp(a,18)+1
if (moviegenre(f,1).eq.master1(c,6)) then
temp(a,54)=temp(a,54)+1
else
endif
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
a=a+1
enddo

!temp(a,19): no. of common movies b/w lead female (status=2) and director
a=1
do b=1,1123
art2=temp(a,13) !director id
if (temp(a,5).eq.2) then
art1=temp(a,6) !743
else
endif
if (temp(a,7).eq.2) then
art1=temp(a,8) !743
else
endif
if (temp(a,9).eq.2) then
art1=temp(a,10) !743
else
endif
if (temp(a,11).eq.2) then
art1=temp(a,12) !743
else
endif

c=1
do d=1,41914
if(master1(c,1).eq.art1) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
e=e+1
movieid(e,1)=master1(c,3)
moviegenre(e,1)=master1(c,6)!genre
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
e=0
c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,19)=temp(a,19)+1
if (moviegenre(f,1).eq.master1(c,6)) then
temp(a,55)=temp(a,55)+1
else
endif
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
a=a+1
enddo

!temp(a,20): no. of common movies b/w lead female (status=2) and producer
a=1
do b=1,1123
art2=temp(a,3) !producer id
if (temp(a,5).eq.2) then
art1=temp(a,6) !743
else
endif
if (temp(a,7).eq.2) then
art1=temp(a,8) !743
else
endif
if (temp(a,9).eq.2) then
art1=temp(a,10) !743
else
endif
if (temp(a,11).eq.2) then
art1=temp(a,12) !743
else
endif
c=1
do d=1,41914
if(master1(c,1).eq.art1) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
e=e+1
movieid(e,1)=master1(c,3)
moviegenre(e,1)=master1(c,6)!genre
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
e=0

c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,20)=temp(a,20)+1
if (moviegenre(f,1).eq.master1(c,6)) then
temp(a,56)=temp(a,56)+1
else
endif
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
art2=temp(a,4) !second producer id
c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,20)=temp(a,20)+1
if (moviegenre(f,1).eq.master1(c,6)) then
temp(a,56)=temp(a,56)+1
else
endif
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
a=a+1
enddo

!temp(a,21): no. of common movies b/w lead female (status=2) and supporting male (status=3)
a=1
do b=1,1123
if (temp(a,5).eq.2) then
art1=temp(a,6) !743
else
endif
if (temp(a,7).eq.2) then
art1=temp(a,8) !743
else
endif
if (temp(a,9).eq.2) then
art1=temp(a,10) !743
else
endif
if (temp(a,11).eq.2) then
art1=temp(a,12) !743
else
endif
if (temp(a,5).eq.3) then
art2=temp(a,6) !743
else
endif
if (temp(a,7).eq.3) then
art2=temp(a,8) !743
else
endif
if (temp(a,9).eq.3) then
art2=temp(a,10) !743
else
endif
if (temp(a,11).eq.3) then
art2=temp(a,12) !743
else
endif
c=1
do d=1,41914
if(master1(c,1).eq.art1) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
e=e+1
movieid(e,1)=master1(c,3)
moviegenre(e,1)=master1(c,6)!genre
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
e=0
c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,21)=temp(a,21)+1
if (moviegenre(f,1).eq.master1(c,6)) then
temp(a,57)=temp(a,57)+1
else
endif
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
a=a+1
enddo

!temp(a,22): no. of common movies b/w lead female (status=2) and supporting female (status=4)
a=1
do b=1,1123
if (temp(a,5).eq.2) then
art1=temp(a,6) !743
else
endif
if (temp(a,7).eq.2) then
art1=temp(a,8) !743
else
endif
if (temp(a,9).eq.2) then
art1=temp(a,10) !743
else
endif
if (temp(a,11).eq.2) then
art1=temp(a,12) !743
else
endif
if (temp(a,5).eq.4) then
art2=temp(a,6) !743
else
endif
if (temp(a,7).eq.4) then
art2=temp(a,8) !743
else
endif
if (temp(a,9).eq.4) then
art2=temp(a,10) !743
else
endif
if (temp(a,11).eq.4) then
art2=temp(a,12) !743
else
endif
c=1
do d=1,41914
if(master1(c,1).eq.art1) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
e=e+1
movieid(e,1)=master1(c,3)
moviegenre(e,1)=master1(c,6)!genre
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
e=0
c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,22)=temp(a,22)+1
if (moviegenre(f,1).eq.master1(c,6)) then
temp(a,58)=temp(a,58)+1
else
endif
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
a=a+1
enddo

!temp(a,23): no. of common movies b/w diro and producer
a=1
do b=1,1123
art2=temp(a,3) !producer id
art1=temp(a,13) !dir id

c=1
do d=1,41914
if(master1(c,1).eq.art1) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
e=e+1
movieid(e,1)=master1(c,3)
moviegenre(e,1)=master1(c,6)!genre
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
e=0

c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,23)=temp(a,23)+1
if (moviegenre(f,1).eq.master1(c,6)) then
temp(a,59)=temp(a,59)+1
else
endif
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
art2=temp(a,4) !second producer id
c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,23)=temp(a,23)+1
if (moviegenre(f,1).eq.master1(c,6)) then
temp(a,59)=temp(a,59)+1
else
endif
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
a=a+1
enddo

!temp(a,24): no. of common movies b/w diro and supporting male (status=3)
a=1
do b=1,1123
art1=temp(a,13) !dir id
if (temp(a,5).eq.3) then
art2=temp(a,6) !743
else
endif
if (temp(a,7).eq.3) then
art2=temp(a,8) !743
else
endif
if (temp(a,9).eq.3) then
art2=temp(a,10) !743
else
endif
if (temp(a,11).eq.3) then
art2=temp(a,12) !743
else
endif
c=1
do d=1,41914
if(master1(c,1).eq.art1) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
e=e+1
movieid(e,1)=master1(c,3)
moviegenre(e,1)=master1(c,6)!genre
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
e=0
c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,24)=temp(a,24)+1
if (moviegenre(f,1).eq.master1(c,6)) then
temp(a,60)=temp(a,60)+1
else
endif
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
a=a+1
enddo

!temp(a,25): no. of common movies b/w diro and supporting female (status=4)
a=1
do b=1,1123
art1=temp(a,13) !dir id
if (temp(a,5).eq.4) then
art2=temp(a,6) !743
else
endif
if (temp(a,7).eq.4) then
art2=temp(a,8) !743
else
endif
if (temp(a,9).eq.4) then
art2=temp(a,10) !743
else
endif
if (temp(a,11).eq.4) then
art2=temp(a,12) !743
else
endif
c=1
do d=1,41914
if(master1(c,1).eq.art1) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
e=e+1
movieid(e,1)=master1(c,3)
moviegenre(e,1)=master1(c,6)!genre
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
e=0
c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,25)=temp(a,25)+1
if (moviegenre(f,1).eq.master1(c,6)) then
temp(a,61)=temp(a,61)+1
else
endif
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
a=a+1
enddo

!temp(a,26): no. of common movies b/w supporting male (status=3) and producer
a=1
do b=1,1123
art2=temp(a,3) !producer id
if (temp(a,5).eq.3) then
art1=temp(a,6) !743
else
endif
if (temp(a,7).eq.3) then
art1=temp(a,8) !743
else
endif
if (temp(a,9).eq.3) then
art1=temp(a,10) !743
else
endif
if (temp(a,11).eq.3) then
art1=temp(a,12) !743
else
endif
c=1
do d=1,41914
if(master1(c,1).eq.art1) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
e=e+1
movieid(e,1)=master1(c,3)
moviegenre(e,1)=master1(c,6)!genre
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
e=0

c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,26)=temp(a,26)+1
if (moviegenre(f,1).eq.master1(c,6)) then
temp(a,62)=temp(a,62)+1
else
endif
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
art2=temp(a,4) !second producer id
c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,26)=temp(a,26)+1
if (moviegenre(f,1).eq.master1(c,6)) then
temp(a,62)=temp(a,62)+1
else
endif
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
a=a+1
enddo

!temp(a,27): no. of common movies b/w supporting female (status=3) and producer
a=1
do b=1,1123
art2=temp(a,3) !producer id
if (temp(a,5).eq.4) then
art1=temp(a,6) !743
else
endif
if (temp(a,7).eq.4) then
art1=temp(a,8) !743
else
endif
if (temp(a,9).eq.4) then
art1=temp(a,10) !743
else
endif
if (temp(a,11).eq.4) then
art1=temp(a,12) !743
else
endif
c=1
do d=1,41914
if(master1(c,1).eq.art1) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
e=e+1
movieid(e,1)=master1(c,3)
moviegenre(e,1)=master1(c,6)!genre
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
e=0

c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,27)=temp(a,27)+1
if (moviegenre(f,1).eq.master1(c,6)) then
temp(a,63)=temp(a,63)+1
else
endif
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
art2=temp(a,4) !second producer id
c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,27)=temp(a,27)+1
if (moviegenre(f,1).eq.master1(c,6)) then
temp(a,63)=temp(a,63)+1
else
endif
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
a=a+1
enddo

!temp(a,28): no. of common movies b/w supporting female (status=4) and supporting male (status=3)
a=1
do b=1,1123
if (temp(a,5).eq.4) then
art1=temp(a,6) !743
else
endif
if (temp(a,7).eq.4) then
art1=temp(a,8) !743
else
endif
if (temp(a,9).eq.4) then
art1=temp(a,10) !743
else
endif
if (temp(a,11).eq.4) then
art1=temp(a,12) !743
else
endif
if (temp(a,5).eq.3) then
art2=temp(a,6) !743
else
endif
if (temp(a,7).eq.3) then
art2=temp(a,8) !743
else
endif
if (temp(a,9).eq.3) then
art2=temp(a,10) !743
else
endif
if (temp(a,11).eq.3) then
art2=temp(a,12) !743
else
endif
c=1
do d=1,41914
if(master1(c,1).eq.art1) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
e=e+1
movieid(e,1)=master1(c,3)
moviegenre(e,1)=master1(c,6)!genre
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
e=0
c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,28)=temp(a,28)+1
if (moviegenre(f,1).eq.master1(c,6)) then
temp(a,64)=temp(a,64)+1
else
endif
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
a=a+1
enddo

!temp(a,29)-temp(a,32): no. of movies by lead male (status=1), lead female (status=2), status=3, status=4
a=1
do b=1,1123
e=1
do f=1,4
if (temp(a,5).eq.e) then
art1=temp(a,6) !743
else
endif
if (temp(a,7).eq.e) then
art1=temp(a,8) !743
else
endif
if (temp(a,9).eq.e) then
art1=temp(a,10) !743
else
endif
if (temp(a,11).eq.e) then
art1=temp(a,12) !743
else
endif

c=1
do d=1,41914
if(master1(c,1).eq.art1) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
temp(a,28+e)=temp(a,28+e)+1
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
e=e+1
enddo
a=a+1
enddo

!temp(a,33): no. of movies by dir 
a=1
do b=1,1123
art1=temp(a,13) !dir id
c=1
do d=1,41914
if(master1(c,1).eq.art1) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
temp(a,33)=temp(a,33)+1
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
a=a+1
enddo

!temp(a,34): no. of movies by prod
a=1
do b=1,1123
art1=temp(a,3) !prod id
c=1
do d=1,41914
if(master1(c,1).eq.art1) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
temp(a,34)=temp(a,34)+1
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
a=a+1
enddo

a=1
do b=1,1123
art1=temp(a,4) !prod2 id
c=1
do d=1,41914
if(master1(c,1).eq.art1) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
temp(a,34)=temp(a,34)+1
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
a=a+1
enddo

!temp(a,35): (revenue) of common movies b/w lead male (status=1) and lead female (status=2)
a=1
do b=1,1123
if (temp(a,5).eq.1) then
art1=temp(a,6) !743
else
endif
if (temp(a,7).eq.1) then
art1=temp(a,8) !743
else
endif
if (temp(a,9).eq.1) then
art1=temp(a,10) !743
else
endif
if (temp(a,11).eq.1) then
art1=temp(a,12) !743
else
endif
if (temp(a,5).eq.2) then
art2=temp(a,6) !743
else
endif
if (temp(a,7).eq.2) then
art2=temp(a,8) !743
else
endif
if (temp(a,9).eq.2) then
art2=temp(a,10) !743
else
endif
if (temp(a,11).eq.2) then
art2=temp(a,12) !743
else
endif
c=1
do d=1,41914
if(master1(c,1).eq.art1) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
e=e+1
movieid(e,1)=master1(c,3)
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
e=0
c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,35)=temp(a,35)+(master1(c,4)) ! revenue in $M
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
a=a+1
enddo

!temp(a,36): rev of common movies b/w lead male (status=1) and director
a=1
do b=1,1123
art2=temp(a,13) !director id
if (temp(a,5).eq.1) then
art1=temp(a,6) !743
else
endif
if (temp(a,7).eq.1) then
art1=temp(a,8) !743
else
endif
if (temp(a,9).eq.1) then
art1=temp(a,10) !743
else
endif
if (temp(a,11).eq.1) then
art1=temp(a,12) !743
else
endif

c=1
do d=1,41914
if(master1(c,1).eq.art1) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
e=e+1
movieid(e,1)=master1(c,3)
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
e=0
c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,36)=temp(a,36)+(master1(c,4))
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
a=a+1
enddo

!temp(a,37): rev of common movies b/w lead male (status=1) and producer
a=1
do b=1,1123
art2=temp(a,3) !producer id
if (temp(a,5).eq.1) then
art1=temp(a,6) !743
else
endif
if (temp(a,7).eq.1) then
art1=temp(a,8) !743
else
endif
if (temp(a,9).eq.1) then
art1=temp(a,10) !743
else
endif
if (temp(a,11).eq.1) then
art1=temp(a,12) !743
else
endif

c=1
do d=1,41914
if(master1(c,1).eq.art1) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
e=e+1
movieid(e,1)=master1(c,3)
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
e=0

c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,37)=temp(a,37)+(master1(c,4))
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
art2=temp(a,4) !second producer id
c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,37)=temp(a,37)+(master1(c,4))
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
a=a+1
enddo

!temp(a,38): rev of common movies b/w lead male (status=1) and supporting male (status=3)
a=1
do b=1,1123
if (temp(a,5).eq.1) then
art1=temp(a,6) !743
else
endif
if (temp(a,7).eq.1) then
art1=temp(a,8) !743
else
endif
if (temp(a,9).eq.1) then
art1=temp(a,10) !743
else
endif
if (temp(a,11).eq.1) then
art1=temp(a,12) !743
else
endif
if (temp(a,5).eq.3) then
art2=temp(a,6) !743
else
endif
if (temp(a,7).eq.3) then
art2=temp(a,8) !743
else
endif
if (temp(a,9).eq.3) then
art2=temp(a,10) !743
else
endif
if (temp(a,11).eq.3) then
art2=temp(a,12) !743
else
endif
c=1
do d=1,41914
if(master1(c,1).eq.art1) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
e=e+1
movieid(e,1)=master1(c,3)
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
e=0
c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,38)=temp(a,38)+(master1(c,4))
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
a=a+1
enddo

!temp(a,39): rev of common movies b/w lead male (status=1) and supporting female (status=4)
a=1
do b=1,1123
if (temp(a,5).eq.1) then
art1=temp(a,6) !743
else
endif
if (temp(a,7).eq.1) then
art1=temp(a,8) !743
else
endif
if (temp(a,9).eq.1) then
art1=temp(a,10) !743
else
endif
if (temp(a,11).eq.1) then
art1=temp(a,12) !743
else
endif
if (temp(a,5).eq.4) then
art2=temp(a,6) !743
else
endif
if (temp(a,7).eq.4) then
art2=temp(a,8) !743
else
endif
if (temp(a,9).eq.4) then
art2=temp(a,10) !743
else
endif
if (temp(a,11).eq.4) then
art2=temp(a,12) !743
else
endif
c=1
do d=1,41914
if(master1(c,1).eq.art1) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
e=e+1
movieid(e,1)=master1(c,3)
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
e=0
c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,39)=temp(a,39)+master1(c,4)
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
a=a+1
enddo

!temp(a,40): rev of common movies b/w lead female (status=2) and director
a=1
do b=1,1123
art2=temp(a,13) !director id
if (temp(a,5).eq.2) then
art1=temp(a,6) !743
else
endif
if (temp(a,7).eq.2) then
art1=temp(a,8) !743
else
endif
if (temp(a,9).eq.2) then
art1=temp(a,10) !743
else
endif
if (temp(a,11).eq.2) then
art1=temp(a,12) !743
else
endif

c=1
do d=1,41914
if(master1(c,1).eq.art1) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
e=e+1
movieid(e,1)=master1(c,3)
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
e=0
c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,40)=temp(a,40)+(master1(c,4))
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
a=a+1
enddo

!temp(a,41): rev of common movies b/w lead female (status=2) and producer
a=1
do b=1,1123
art2=temp(a,3) !producer id
if (temp(a,5).eq.2) then
art1=temp(a,6) !743
else
endif
if (temp(a,7).eq.2) then
art1=temp(a,8) !743
else
endif
if (temp(a,9).eq.2) then
art1=temp(a,10) !743
else
endif
if (temp(a,11).eq.2) then
art1=temp(a,12) !743
else
endif
c=1
do d=1,41914
if(master1(c,1).eq.art1) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
e=e+1
movieid(e,1)=master1(c,3)
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
e=0

c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,41)=temp(a,41)+master1(c,4)
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
art2=temp(a,4) !second producer id
c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,41)=temp(a,41)+master1(c,4)
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
a=a+1
enddo

!temp(a,42): rev of common movies b/w lead female (status=2) and supporting male (status=3)
a=1
do b=1,1123
if (temp(a,5).eq.2) then
art1=temp(a,6) !743
else
endif
if (temp(a,7).eq.2) then
art1=temp(a,8) !743
else
endif
if (temp(a,9).eq.2) then
art1=temp(a,10) !743
else
endif
if (temp(a,11).eq.2) then
art1=temp(a,12) !743
else
endif
if (temp(a,5).eq.3) then
art2=temp(a,6) !743
else
endif
if (temp(a,7).eq.3) then
art2=temp(a,8) !743
else
endif
if (temp(a,9).eq.3) then
art2=temp(a,10) !743
else
endif
if (temp(a,11).eq.3) then
art2=temp(a,12) !743
else
endif
c=1
do d=1,41914
if(master1(c,1).eq.art1) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
e=e+1
movieid(e,1)=master1(c,3)
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
e=0
c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,42)=temp(a,42)+master1(c,4)
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
a=a+1
enddo

!temp(a,43): rev of common movies b/w lead female (status=2) and supporting female (status=4)
a=1
do b=1,1123
if (temp(a,5).eq.2) then
art1=temp(a,6) !743
else
endif
if (temp(a,7).eq.2) then
art1=temp(a,8) !743
else
endif
if (temp(a,9).eq.2) then
art1=temp(a,10) !743
else
endif
if (temp(a,11).eq.2) then
art1=temp(a,12) !743
else
endif
if (temp(a,5).eq.4) then
art2=temp(a,6) !743
else
endif
if (temp(a,7).eq.4) then
art2=temp(a,8) !743
else
endif
if (temp(a,9).eq.4) then
art2=temp(a,10) !743
else
endif
if (temp(a,11).eq.4) then
art2=temp(a,12) !743
else
endif
c=1
do d=1,41914
if(master1(c,1).eq.art1) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
e=e+1
movieid(e,1)=master1(c,3)
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
e=0
c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,43)=temp(a,43)+master1(c,4)
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
a=a+1
enddo

!temp(a,44): no. of common movies b/w diro and producer
a=1
do b=1,1123
art2=temp(a,3) !producer id
art1=temp(a,13) !dir id

c=1
do d=1,41914
if(master1(c,1).eq.art1) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
e=e+1
movieid(e,1)=master1(c,3)
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
e=0

c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,44)=temp(a,44)+master1(c,4)
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
art2=temp(a,4) !second producer id
c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,44)=temp(a,44)+master1(c,4)
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
a=a+1
enddo

!temp(a,45): rev of common movies b/w diro and supporting male (status=3)
a=1
do b=1,1123
art1=temp(a,13) !dir id
if (temp(a,5).eq.3) then
art2=temp(a,6) !743
else
endif
if (temp(a,7).eq.3) then
art2=temp(a,8) !743
else
endif
if (temp(a,9).eq.3) then
art2=temp(a,10) !743
else
endif
if (temp(a,11).eq.3) then
art2=temp(a,12) !743
else
endif
c=1
do d=1,41914
if(master1(c,1).eq.art1) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
e=e+1
movieid(e,1)=master1(c,3)
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
e=0
c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,45)=temp(a,45)+master1(c,4)
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
a=a+1
enddo

!temp(a,46): rev of common movies b/w diro and supporting female (status=4)
a=1
do b=1,1123
art1=temp(a,13) !dir id
if (temp(a,5).eq.4) then
art2=temp(a,6) !743
else
endif
if (temp(a,7).eq.4) then
art2=temp(a,8) !743
else
endif
if (temp(a,9).eq.4) then
art2=temp(a,10) !743
else
endif
if (temp(a,11).eq.4) then
art2=temp(a,12) !743
else
endif
c=1
do d=1,41914
if(master1(c,1).eq.art1) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
e=e+1
movieid(e,1)=master1(c,3)
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
e=0
c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,46)=temp(a,46)+master1(c,4)
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
a=a+1
enddo

!temp(a,47): no. of common movies b/w supporting male (status=3) and producer
a=1
do b=1,1123
art2=temp(a,3) !producer id
if (temp(a,5).eq.3) then
art1=temp(a,6) !743
else
endif
if (temp(a,7).eq.3) then
art1=temp(a,8) !743
else
endif
if (temp(a,9).eq.3) then
art1=temp(a,10) !743
else
endif
if (temp(a,11).eq.3) then
art1=temp(a,12) !743
else
endif
c=1
do d=1,41914
if(master1(c,1).eq.art1) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
e=e+1
movieid(e,1)=master1(c,3)
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
e=0

c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,47)=temp(a,47)+master1(c,4)
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
art2=temp(a,4) !second producer id
c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,47)=temp(a,47)+master1(c,4)
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
a=a+1
enddo

!temp(a,48): rev of common movies b/w supporting female (status=3) and producer
a=1
do b=1,1123
art2=temp(a,3) !producer id
if (temp(a,5).eq.4) then
art1=temp(a,6) !743
else
endif
if (temp(a,7).eq.4) then
art1=temp(a,8) !743
else
endif
if (temp(a,9).eq.4) then
art1=temp(a,10) !743
else
endif
if (temp(a,11).eq.4) then
art1=temp(a,12) !743
else
endif
c=1
do d=1,41914
if(master1(c,1).eq.art1) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
e=e+1
movieid(e,1)=master1(c,3)
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
e=0

c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,48)=temp(a,48)+master1(c,4)
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
art2=temp(a,4) !second producer id
c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,48)=temp(a,48)+master1(c,4)
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
a=a+1
enddo

!temp(a,49): rev of common movies b/w supporting female (status=4) and supporting male (status=3)
a=1
do b=1,1123
if (temp(a,5).eq.4) then
art1=temp(a,6) !743
else
endif
if (temp(a,7).eq.4) then
art1=temp(a,8) !743
else
endif
if (temp(a,9).eq.4) then
art1=temp(a,10) !743
else
endif
if (temp(a,11).eq.4) then
art1=temp(a,12) !743
else
endif
if (temp(a,5).eq.3) then
art2=temp(a,6) !743
else
endif
if (temp(a,7).eq.3) then
art2=temp(a,8) !743
else
endif
if (temp(a,9).eq.3) then
art2=temp(a,10) !743
else
endif
if (temp(a,11).eq.3) then
art2=temp(a,12) !743
else
endif
c=1
do d=1,41914
if(master1(c,1).eq.art1) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
e=e+1
movieid(e,1)=master1(c,3)
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
e=0
c=1
do d=1,41914
if(master1(c,1).eq.art2) then
if(master1(c,4).gt.0) then
if(master1(c,2).le.temp(a,2)) then !year of release
if(master1(c,2).gt.(temp(a,2)-8)) then !year of release
f=1
do g=1,300
if (movieid(f,1).eq.master1(c,3)) then
temp(a,49)=temp(a,49)+master1(c,4)
else
endif
f=f+1
enddo
else
endif
else
endif
else
endif
else
endif
c=c+1
enddo
a=a+1
enddo

a=1
do b=1,1123
c=1
do d=1,51
t14(c,1)=t14(c,1)+temp(a,13+c)/1123
c=c+1
enddo
a=a+1
enddo

a=1
do b=1,15
print *,t14(a,1)
print *,t14(36+a,1)
a=a+1
enddo

write (37,1001)((temp(a,b),b=1,64),a=1,1123)
1001 format(64f15.3)
end program

